/* eslint-disable */
// @ts-ignore
import request from '@/utils/request';
import { CustomRequestOptions } from '@/interceptors/request';

import * as API from './types';

/** 查询质量科普分页列表 GET /science */
export async function scienceGet3({
  params,
  options,
}: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.ScienceGetParams;
  options?: CustomRequestOptions;
}) {
  return request<API.ResponseModelResponseDataListModelScienceModel_>(
    '/science',
    {
      method: 'GET',
      params: {
        ...params,
      },
      ...(options || {}),
    }
  );
}

/** 编辑质量科普 PUT /science */
export async function scienceUpdate2({
  body,
  options,
}: {
  body: API.UpdateScienceModel;
  options?: CustomRequestOptions;
}) {
  return request<API.ResponseModelObject_>('/science', {
    method: 'PUT',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 新增质量科普 POST /science */
export async function scienceInsert2({
  body,
  options,
}: {
  body: API.InsertScienceModel;
  options?: CustomRequestOptions;
}) {
  return request<API.ResponseModelObject_>('/science', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 删除质量科普 DELETE /science */
export async function scienceDelete({
  params,
  options,
}: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.ScienceDeleteParams;
  options?: CustomRequestOptions;
}) {
  return request<API.ResponseModelObject_>('/science', {
    method: 'DELETE',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 查询质量科普类别分页列表 GET /science/category */
export async function scienceGet({
  params,
  options,
}: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.ScienceGetParams;
  options?: CustomRequestOptions;
}) {
  return request<API.ResponseModelResponseDataListModelScienceCategoryModel_>(
    '/science/category',
    {
      method: 'GET',
      params: {
        ...params,
      },
      ...(options || {}),
    }
  );
}

/** 编辑质量科普类别 PUT /science/category */
export async function scienceUpdate({
  body,
  options,
}: {
  body: API.UpdateScienceCategoryModel;
  options?: CustomRequestOptions;
}) {
  return request<API.ResponseModelObject_>('/science/category', {
    method: 'PUT',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 新增质量科普类别 POST /science/category */
export async function scienceInsert({
  body,
  options,
}: {
  body: API.InsertScienceCategoryModel;
  options?: CustomRequestOptions;
}) {
  return request<API.ResponseModelObject_>('/science/category', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 删除质量科普类别 DELETE /science/category */
export async function scienceDeleteCategory({
  params,
  options,
}: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.ScienceDeleteCategoryParams;
  options?: CustomRequestOptions;
}) {
  return request<API.ResponseModelObject_>('/science/category', {
    method: 'DELETE',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 查询质量科普类别详情 GET /science/category/detail */
export async function scienceGetCategory({
  params,
  options,
}: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.ScienceGetCategoryParams;
  options?: CustomRequestOptions;
}) {
  return request<API.ResponseModelScienceCategoryModel_>(
    '/science/category/detail',
    {
      method: 'GET',
      params: {
        ...params,
      },
      ...(options || {}),
    }
  );
}

/** 查询质量科普类别列表 GET /science/category/list */
export async function scienceGet2({
  params,
  options,
}: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.ScienceGetParams;
  options?: CustomRequestOptions;
}) {
  return request<API.ResponseModelListScienceCategoryModel_>(
    '/science/category/list',
    {
      method: 'GET',
      params: {
        ...params,
      },
      ...(options || {}),
    }
  );
}

/** 查询质量科普详情 GET /science/detail */
export async function scienceGet4({
  params,
  options,
}: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.ScienceGetParams;
  options?: CustomRequestOptions;
}) {
  return request<API.ResponseModelScienceModel_>('/science/detail', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 编辑质量科普上架状态 PUT /science/list_status */
export async function scienceUpdate3({
  body,
  options,
}: {
  body: API.UpdateScienceListStatusModel;
  options?: CustomRequestOptions;
}) {
  return request<API.ResponseModelObject_>('/science/list_status', {
    method: 'PUT',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 编辑质量科普是否热门 PUT /science/popular */
export async function scienceUpdate4({
  body,
  options,
}: {
  body: API.UpdateSciencePopularModel;
  options?: CustomRequestOptions;
}) {
  return request<API.ResponseModelObject_>('/science/popular', {
    method: 'PUT',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}
